<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="CYW">
    <title></title>
    <style>
       main{
           width: 500px;
           height: 300px;
           border:1px solid black;
       }
       ul{
           width: 100%;
           height: 50px;
           margin: 0;
           padding: 0;
           list-style: none;
           background-color: black;
           display: flex;
           justify-content: flex-start;
          
       }
       ul li{
           text-align: center;
           line-height: 50px;
           height: 50px;
           width: 70px;
           padding: 0 20px;  
           color:white;
           display: inline-block;
         
       }
        .word section{
             width: 100px;
             height: 100px;
            text-align: center;
             position: absolute;
             display: none;
        }
        .select1{
            background-color:#999;
        }
        section.word1{
            display: block;
        }
       
   
    </style>
</head>
<body>
    <main>
        <ul class="select">
            <li class="select1">选项一</li>
            <li >选项二</li>       
            <li >选项三</li>
        </ul>
        
            <span class="word">  
                    <section class="word1">内容一<br>内容一</section>
                    <section>内容二<br>内容二
                    <p>22222</p>
                    </section>
                    <section>内容三<br>内容三</section>
                 </span> 
           
         
    </main>

   <script src="jquery.js"></script>
</body>
</html>
<script>

   $('li').each(function(index){
       console.log(index);

  $('li').eq(index).hover(function(){

    $('li').eq(index).css('background-color','#999').siblings().css('background-color','black');

    $('span.word').find('section').eq(index).css('display','block').siblings().css('display','none')


// 鼠标离开返回第一个
  }, function(){
   
$('.select1').css('background-color','#999').siblings().css('background-color','black');
 $('.word1').css('display','block').siblings().css('display','none')

  })     
   });

</script>